Skip to content

Fix SerialBT.flush #3579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2020
Merged

Fix SerialBT.flush #3579

merged 3 commits into from
Jan 20, 2020

Conversation

mishafarms
Copy link
Contributor

flush should not flush the read buffer, it should wait till all output is drained from the write buffer.

flush should not flush the read buffer, it should wait till all output is drained from the write buffer.
@lbernstone
Copy link
Contributor

#3433 was recently merged to fix this.

@mishafarms
Copy link
Contributor Author

mishafarms commented Dec 18, 2019

I should have put a better title.
#3433 is for the uart serial port, This is for the Standard Bluetooth SerialBT.flush. I don't think #3433 fixes it.

@mishafarms mishafarms changed the title Fix flush Fix SerialBT.flush Dec 18, 2019
while(read() >= 0){}
if (_spp_tx_queue != NULL){
while(uxQueueMessagesWaiting(_spp_tx_queue) > 0){
delay(50);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

50 is a bit too much :) there ought to be a better way.

@me-no-dev me-no-dev merged commit b4a9684 into espressif:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants